package com.hxzy.controller.admin;

import com.hxzy.common.core.controller.BaseController;

import com.hxzy.common.core.domain.AjaxResult;
import com.hxzy.common.core.domain.entity.Menu;
import com.hxzy.system.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;

@RestController
@RequestMapping(value = "/admin")
public class MenuController extends BaseController {
    @Autowired
    private MenuService menuService;

    /**
     * 查询全部菜单界面
     * @return
     */
    @ResponseBody
    @PostMapping(value = "/list")
    public List<Menu> ajaxData(){
        List<Menu> menus = this.menuService.selectAllMenu();
        return menus;
    }

    /**
     * 新增菜单
     */
    @ResponseBody
    @PostMapping(value = "/add")
    public AjaxResult addData(Menu menu){
        return null;
    }


}
